package com.cmf.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cmf.common.PageResult;
import com.cmf.common.Result;
import com.cmf.dto.EmployeeDto;
import com.cmf.dto.EmployeeLoginDto;
import com.cmf.dto.EmployeeUpdateDto;
import com.cmf.entity.Employee;
import com.cmf.vo.EmployeeVo;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: cmf
 * @Date: 2025/8/27 16:16
 * @Version: v1.0.0
 * @Description: TODO
 **/
@Service
public interface EmployeeService extends IService<Employee> {
    Result<EmployeeVo> login(HttpServletRequest httpServletRequest, EmployeeLoginDto employeeLoginDto);

    Result<Void> logout(HttpServletRequest httpServletRequest);

    Result<Void> addEmployee(EmployeeDto employeeDto);

    Result<PageResult<EmployeeVo>> findPage(Long page, Long pageSize, String name);

    Result<EmployeeVo> findById(Long id);

    Result<Void> updateEmployee(EmployeeUpdateDto employeeDto);
}
